package lovo01.homework01;

/**
 * 车主类
 */
public class Owner {
    public String name;
    public int age;
    public Owner(){}
    public Owner(String name,int age){
        this.name = name;
        this.age = age;
    }
    public void Violations(Car car,Police police,Rule rule){
        System.out.println("姓名为" + this.name + ",年龄" + this.age + "岁的驾驶员，驾驶车牌号为"
                    + car.carNumber + "的" + car.name + "在马路上" + rule.name + "，向警号"
                    + police.policeNumber + "的" + police.name + "缴纳" + rule.penalty + "元罚款"
        );
    }
}
